<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<meta name="viewport"
		content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta name="format-detection" content="telephone=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/index.css">
	<title>意见反馈</title>
	<script type="text/javascript" src="js/flexible.js"></script>
</head>

<body>
	<div class="content mfb pt80" id="app">
		<!-- header -->
		<header class="dheader flex-align flex-between">
			<a href="javascript:history.back(-1);" class="dheader-back iconfont iconleft cfff"></a>
			<div class="dheader-title tc cfff">意见反馈</div>
		</header>
		<!--  -->
		<div class="mfb-main">
			<div class="fbanner">
				<img class="img100" src="./images/my/feedback/feedback.png" mode="widthFix"></img>
				<div class="fbanner-b flex-center-align show-app">我要反馈</div>
			</div>
			<div class="fbox">
				<div class="fbox-main">
					<img class="fbox-i" src="./images/my/feedback/feedback7.png" mode="widthFix"></img>
					<span class="fbox-t">奖励方式</span>
					<div class="fbox-p">
						<span>为了给热爱游戏的玩家提供更好的游戏平台，我们开放了建议奖励，玩家们可以提出平台出现的BUG问题、建议或需要优化的地方，我们一定认真审核，采集好的建议提升玩家的游戏体验！</span>
					</div>
					<div class="fbox-li fbox-lia">
						<span class="fbox-li-t">参与方式</span>
						<span class="fbox-li-p">玩家可以点击“我要反馈”写出发现的BUG问题、建议或需要优化的内容，然后提供截屏或视频提交即可参与。 ‌‌</span>
					</div>
					<div class="fbox-li fbox-lib">
						<span class="fbox-li-t">奖励介绍</span>
						<span
							class="fbox-li-p">根据玩家提供的内容，经过平台审核之后分为三个获奖等级，“参与奖”“优质奖”“热度奖”每个等级都会有不同的蓝钻奖励，等级越高，奖励越丰富。</span>
						<span class="fbox-li-p">参与奖： 66蓝钻</span>
						<span class="fbox-li-p">优质奖： 666蓝钻</span>
						<span class="fbox-li-p">热度奖： 6666蓝钻</span>
					</div>
					<div class="fbox-ts">
						<span>注意事项：</span>
						<span>1、审核时间通常为2-7天（具体以官方公告为准）。</span>
						<span>2、需按格式要求提交信息，禁止胡乱或恶意多次提交取消参与资格‌‌。</span>
					</div>
				</div>

			</div>

		</div>
		<!--  -->
	</div>
	<!--  -->
	<script src="js/jquery.min.js"></script>
	<script src="js/vue.global.js"></script>
	<script src="js/used.js"></script>
	<script>

		const { createApp, ref, reactive, onMounted } = Vue
		createApp({
			setup() {
				onMounted(() => {
					$('#app').show()
				})
				let userinfo = reactive({
					money: 0
				})
				//
				let list = ref([
					{ id: '1', price: 10 },
					{ id: '2', price: 30 },
					{ id: '3', price: 50 },
					{ id: '4', price: 100 },
					{ id: '5', price: 500 },
					{ id: '6', price: 1000 },
				]);
				let cIndex = ref('');//当前选中
				//
				function navTap(item, index) {
					cIndex.value = index;
					val1.value = item.price;
					val2.value = '';
				}

				let isFocused = ref(false);//是否聚焦
				let val1 = ref('');//选择的金额
				let val2 = ref('');//输入的金额
				//验证
				function checkDecimal(str) {
					const regex = /^(0|([1-9]\d*))$/;
					return regex.test(String(str));
				}
				//输入框验证
				function iptFnA(e) {
					let val = e.target.value;
					if (!checkDecimal(val)) {
						toast.success('金额必须为整数');
					}
					val = val.replace(/[^\d]/g, '');
					val = val.replace(/^0+/g, '');
					val1.value = val
				}
				//
				function handleFocus() {
					isFocused.value = true;
					cIndex.value = ''
				}
				//
				let flagpay = ref(1);
				//点击支付方式
				function toSelect(e) {
					flagpay.value = e
				}
				//提交
				function toCz() {
					console.log(1);
					if (val1.value == '') {
						toast.success('充值金额不能为空');
						return
					}
					let params = {
						app_id: 1,
						pay_type: flagpay.value == 1 ? 'zfb' : 'wx',
						amount: val1.value,
					};
					let JLparams = {
						goodsType: '平台币', // 商品类型 String 
						goodsName: '', // 商品名称 String
						goodsId: '', // 商品ID String
						goodsNum: val1.value, // 商品数量 int
						payChannel: flagpay.value == 1 ? 'zfb' : 'wx', // 支付渠道 String
						currency: '', // 币种 String
						success: true, // 是否成功 boolean
						amount: val1.value, // 金额，单位为元 int
					};
					console.log(params, '----params');
					console.log(JLparams, '----JLparams');
					this.$u.api.ptb_cz(params).then(res => {
						console.log(res);
						// #ifdef APP-PLUS
						// alipay
						this.order_num = res.order_num;
						uni.requestPayment({
							provider: this.flagpay == 1 ? 'alipay' : 'wxpay',
							orderInfo: res.data.pay,
							success: s => {
								uni.showToast({
									title: "支付成功",
									icon: 'success'
								})
								this.$zml.getUserinfo();
								trackJLData('active_pay');
								this.$used.baiduActive('pay', JLparams.amount);//百度统计 -
							},
							fail: f => {
								JLparams.success = false;
								uni.showToast({
									title: "支付失败",
									icon: 'error'
								})
							},
							complete: f => {
								this.$zml.onPurchase(JLparams) // 巨量上报消费支付
								// setTimeout(() => {
								// 	// reLaunch
								// 	uni.navigateTo({
								// 		url: `/pages/pay/payEnd?order=${res.data.trade_no}&payType=2`,
								// 	})
								// }, 500)
							}
						})
						// #endif

						// #ifdef H5
						if (this.flagpay == 2) {
							console.log('wx');
							// 微信支付
							// console.log(1);
							// window.location.href = res.data.h5_url
							// this.payurl = res.data.pay
							// uni.navigateTo({
							// 	url:res.data.pay
							// })
							window.location.href = res.data.pay;

						} else {
							console.log('zfb');
							// 支付宝支付
							if (document.forms[0]) document.forms[0].remove();
							let div = document.createElement('div')
							div.id = 'alipay';
							div.innerHTML = res.data.pay
							document.body.appendChild(div)
							document.forms[0].submit()
						}
						// #endif
						// 
						// reLaunch
						// uni.navigateTo({
						// 	url: `/pages/pay/payEnd?order=${res.data.trade_no}&payType=2`,
						// })
					})

				}
				return {
					userinfo,
					list,
					navTap,
					cIndex,
					flagpay,
					iptFnA,
					isFocused,
					toSelect,
					handleFocus,
					val2,
					toCz
				}
			}
		}).mount('#app')
	</script>
</body>

</html>